package com.janj.bean;

import java.util.List;

public class Course {

    private Integer cid ;
    private String cname ;
    //什么关系?多对多
    //多个一对多
       private List<Student> students;

    public Course() {
    }
    public Course(Integer cid, String cname, List<Student> studnets) {
        this.cid = cid;
        this.cname = cname;
        this.students = students;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public List<Student> getStudnets() {
        return students;
    }

    public void setStudnets(List<Student> studnets) {
        this.students = students;
    }

    @Override
    public String toString() {
        return "Course{" +
                "cid=" + cid +
                ", cname='" + cname + '\'' +
                ", studnets=" + students +
                '}';
    }
}
